// 连接数据库的文件    graduation-project 数据库名
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/graduation-project', {useNewUrlParser: true, useUnifiedTopology: true});
// 打印是否连接成功
mongoose.connection.on("connected",function(){
    console.log('MongoDB is Connected');
})